package com.dfbz.dao;

import com.dfbz.dao.Base.BaseDao;
import com.dfbz.model.Favorite;
import org.springframework.jdbc.core.JdbcTemplate;

public class FavoriteDao extends BaseDao<Favorite> {
    private JdbcTemplate jdbcTemplate=getJdbcTemplate();
    public FavoriteDao() {
        super(Favorite.class);
    }

    public void deleteFav(Integer uId, Integer aId) {
        String sql="delete " +
                "from favorite " +
                "where favorite.u_id=? and favorite.a_id=? ";
        jdbcTemplate.update(sql,uId,aId);
    }
}
